import React, { Component } from 'react'
import {connect} from 'react-redux'
import { RecommendWrapper, RecommendItem } from '../style';

class Recommend extends Component {
    render() {
        const {list} = this.props
        return (
            <div>
               <RecommendWrapper>
                   {
                       list.map((item)=>{
                           return (
                            <RecommendItem Url={item.get('url')} key={item.get('id')}></RecommendItem>
                           )
                       })
                   }
               
               </RecommendWrapper>
            </div>
        )
    }
}
const mapToProps = (state) => ({
    list: state.home.get('recommend')
})
export default connect( mapToProps, null)(Recommend)

